package com.design.pattern.component;

public class Client {
    public static void main(String[] args) {
        //先造几个小人
        MagicBox jim=new BoxPerson("jim");
        MagicBox tom=new BoxPerson("tom");
        MagicBox Jerry=new BoxPerson("Jerry");
        //然后造几个盒子
        MagicBoxNode first=new MagicBoxNode("first");
        MagicBoxNode second=new MagicBoxNode("second");
        MagicBoxNode third=new MagicBoxNode("third");
        third.add(tom);
        second.add(third);
        second.add(jim);
        first.add(second);
        first.add(Jerry);
        first.getAll();
    }
}
